package com.sanshi.project.admin.api.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 楼栋
 *
 * @author nikon
 * @date 2023-11-17 17:02:24
 */
@Data
@TableName("building")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "楼栋")
public class BuildingEntity extends Model<BuildingEntity> {


    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "主键")
    private Long id;

    /**
     * 项目Id
     */
    @Schema(description = "项目Id")
    private Long projectId;

    /**
     * 楼栋编号
     */
    @Schema(description = "楼栋编号")
    private String code;

    /**
     * 楼栋名称
     */
    @Schema(description = "楼栋名称")
    private String name;

    /**
     * 地上楼层数
     */
    @Schema(description = "地上楼层数")
    private Integer upFloorCount;

    /**
     * 地下楼层数
     */
    @Schema(description = "地下楼层数")
    private Integer downFloorCount;

    /**
     * 单元数
     */
    @Schema(description = "单元数")
    private Integer entranceCount;

    /**
     * 地址
     */
    @Schema(description = "地址")
    private String address;

    /**
     * 经度
     */
    @Schema(description = "经度")
    private BigDecimal lng;

    /**
     * 纬度
     */
    @Schema(description = "纬度")
    private BigDecimal lat;

    /**
     * 建筑面积
     */
    @Schema(description = "建筑面积")
    private BigDecimal floorArea;

    /**
     * 使用面积
     */
    @Schema(description = "使用面积")
    private BigDecimal useArea;

    /**
     * 移交单位
     */
    @Schema(description = "移交单位")
    private String deliverCompany;

    /**
     * 移交日期
     */
    @Schema(description = "移交日期")
    private LocalDate deliverDate;

    /**
     * 文件
     */
    @Schema(description = "文件")
    private String file;

    /**
     * 备注
     */
    @Schema(description = "备注")
    private String remark;

    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建人")
    private String createBy;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "创建时间")
    private LocalDateTime createTime;

    /**
     * 更新人
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新人")
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;

    /**
     * 删除标记;删除标记[0未删除，1已删]
     */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    @Schema(description = "删除标记;删除标记[0未删除，1已删]")
    private String delFlag;

    /**
     * 租户号
     */
    @Schema(description = "租户号")
    private Long tenantId;
}